#include "DTDEntityElement.h"
#include <vector>
#include <string>

using namespace std;

DTDEntityElement::DTDEntityElement(string nodeName, string name): XMLEntity(nodeName)
{
	this->name = name;
	rule = NULL;
}

string DTDEntityElement::toString()
{
	return "<!ELEMENT " + name + " " + rule->toString() + " >\n";
}

void DTDEntityElement::setRule(DTDRule * rule)
{
	this->rule = rule;
}

bool DTDEntityElement::checkChildListValidity(vector<string> balises)
{
	return !rule->isValid(balises);
}

string DTDEntityElement::getName()
{
	return name;
}
